//
//  SimonViewController.h
//  Simon
//
//  Created by Mr. Steptoe on 5/1/10.
//  Copyright __MyCompanyName__ 2010. All rights reserved.
//

#import <UIKit/UIKit.h>

#define MAXSEQUENCE 5

@interface SimonViewController : UIViewController {

	IBOutlet UILabel *simonTitle;
	IBOutlet UIButton *redButton;
	IBOutlet UIButton *yellowButton;
	IBOutlet UIButton *greenButton;
	IBOutlet UIButton *blueButton;
	IBOutlet UIButton *startSequenceButton;
	IBOutlet UIImageView *sequenceFlasher;
	
	NSTimer *sequencer;
	
	BOOL gameRunning;
	int sequenceCounter;
	int currentNumber;
	NSInteger sequenceArray[MAXSEQUENCE];
	
}

//@property (nonatomic, retain) UILabel *simonTitle;
@property (nonatomic, retain) UIButton *redButton;
@property (nonatomic, retain) UIButton *yellowButton;
@property (nonatomic, retain) UIButton *greenButton;
@property (nonatomic, retain) UIButton *blueButton;
@property (nonatomic, retain) UIButton *startSequenceButton;
@property (nonatomic, retain) UIImageView *sequenceFlasher;

-(IBAction)redButtonPressed:(id)sender;
-(IBAction)yellowButtonPressed:(id)sender;
-(IBAction)greenButtonPressed:(id)sender;
-(IBAction)blueButtonPressed:(id)sender;
-(IBAction)startSequenceButtonPressed:(id)sender;

-(void)setUpTimer;
-(void)sequence:(NSTimer *)theTimer;
-(void)stopTimer;

-(void)buildSequenceArray;
-(void)addElement;

-(BOOL)checkInput:(int)color;
-(void)lose;
-(void)win;

@end

